<%@page import="entity.Pagination"%>
<%@page import="entity.Movie"%>
<%@page import="service.*"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setCharacterEncoding("utf-8");
MovieService ms = new MovieService();
int mid = Integer.parseInt(request.getParameter("id"));
ArrayList<Movie> cs = ms.findone(mid);

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>修改电影</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	 
<link rel="stylesheet" href="css/bootstrap.css" >

</head>
  <script src="js/jquery2.2.3.js"></script>
  <script src="js/bootstrap.js"></script>
<body>
   <nav class="navbar navbar-inverse" role="navigation">
   <div class="navbar-header">
      <a class="navbar-brand" href="index.jsp">电影网</a>
   </div>
    <div>
      <ul class="nav navbar-nav">
         <li><a href="add_movie.jsp">添加电影</a></li>
         <li><a href="update_movie.jsp">修改电影</a></li> 
      </ul>

      <ul class="nav navbar-nav navbar-right">
         <li><a href="loginout.jsp">退出管理员模式</a></li>
      </ul>
</div>
</nav>

 <div class="container-fluid">
	<div class="row-fluid">
	<h2 class="center-block" style="text-align:center;width:200px">修改电影</h2>
		<form class="form-horizontal" role="form" method="post" action="UpdateMovie" style="margin-left:200px">
 	 <img src="<%=cs.get(0).getPicture()%>" style="float:left;padding-top:20px;padding-left: 20px;height: 252px;width:188px">
 	 				<input type="hidden" name="mid" value="<%=mid%>">
 	 					<div class="col-sm-10">	 
 	 					  <div class="form-group ">
 	 					  <label for="name" class="col-sm-1 control-label">名字</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="name" class="form-control" value="<%=cs.get(0).getName() %>">
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="director" class="col-sm-1 control-label">导演</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="director" class="form-control" value="<%=cs.get(0).getDirector() %>">
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="actor" class="col-sm-1 control-label">演员</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="actor" class="form-control" value="<%=cs.get(0).getActor() %>">
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="type" class="col-sm-1 control-label">类型</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="type" class=" form-control" value="<%=cs.get(0).getType() %>">
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="length" class="col-sm-1 control-label">时长</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="length" class=" form-control" value="<%=cs.get(0).getLength() %>">
            			  	</div>	
            			  </div>
            			   <div class="form-group ">
 	 					  <label for="price" class="col-sm-1 control-label">价格</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="price" class=" form-control" value="<%=cs.get(0).getPrice() %>">
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="mark" class="col-sm-1 control-label">评分</label>	
 	 					  	<div class="col-sm-6">
            					<input type="text" name="mark" class=" form-control" value="<%=cs.get(0).getMark() %>">
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="introduce" class="col-sm-1 control-label">简介</label>	
 	 					  	<div class="col-sm-6">
            					<textarea name="introduce" class=" form-control"  style="height:150px"><%=cs.get(0).getIntroduce() %></textarea>
            			  	</div>	
            			  </div>
            			  <div class="form-group ">
 	 					  <label for="submit" class="col-sm-1 control-label"></label>	
 	 					  	<div class="col-sm-6">
            					<button type="submit" class="btn btn-primary">完成</button>
            			  	</div>	
            			  </div>
            			  </div>
        			
	 </form>
  </div>	
 </div>


</body>
</html>